// supplier 供应商相关
import { post } from '@/api/http'

// 供应商列表
const supplier = {
  // 借调同行
  supplier_jdth: {
    label: 'industryName',
    keyword: 'industryName',
    key: 'id',
    mode: 'each',
    data: {
      supplierType: 8,
    },
    api: (data: any) => post({ url: '/sameIndustryInfo/getList', data }),
  },
  // 汽车销售
  supplier_qcxs: {
    label: 'supplierName',
    keyword: 'supplierName',
    key: 'id',
    mode: 'each',
    data: {
      supplierType: 3,
      status: 1,
    },
    api: (data: any) => post({ url: '/supplier/findList', data }),
  },
  // 保险
  supplier_bx: {
    label: 'supplierName',
    keyword: 'supplierName',
    key: 'id',
    mode: 'each',
    data: {
      supplierType: 7,
      status: 1,
    },
    api: (data: any) => post({ url: '/supplier/findList', data }),
  },
  // 多选-保险供应商列表
  multiple_supplier_bx: {
    label: 'supplierName',
    keyword: 'supplierName',
    key: 'id',
    mode: 'multiple',
    data: {
      supplierType: 7,
      status: 1,
    },
    api: (data: any) => post({ url: '/supplier/findList', data }),
  },
  // 借调公司
  transferCompany: {
    label: 'name',
    keyword: 'industryNameLike',
    key: 'id',
    mode: 'each',
    data: {
      pageNumber: 1,
      pageSize: 100,
    },
    api: (data: any) => post({ url: '/sameIndustryInfo/getListWithSite', data }),
  },
  // 同行全部数据
  supplier_allth: {
    label: 'industryName',
    keyword: 'industryNameLike',
    key: 'id',
    mode: 'each',
    data: {
      pageNumber: 1,
      pageSize: 200,
    },
    api: (data: any) => post({ url: '/sameIndustryInfo/findPageList', data }),
  },
}

export default {
  ...supplier,
}
